if exists (select * from dbo.sysobjects where id = object_id(N'[dbo].[sp_FindAllUser]') and OBJECTPROPERTY(id, N'IsProcedure') = 1)
drop procedure [dbo].[sp_FindAllUser]
GO
CREATE PROC sp_FindAllUser
AS
BEGIN
	SELECT A.ID, A.Username, A.Password, A.Salt, B.Name,
		C.FirstName, C.LastName, C.Email, C.Address, C.Phone,
		cast(datepart(mm,C.Birthday) as varchar) As BMonth,
		cast(datepart(dd,C.Birthday) as varchar) As BDay,
		cast(datepart(yyyy,C.Birthday) as varchar) As BYear
		FROM Account As A
			INNER JOIN AccountType As B ON A.AccountType = B.ID
			INNER JOIN AccountInformation As C ON A.ID = C.AccountID
END
